package cn.lysj.framework.common.service;

import cn.lysj.framework.base.BaseService;
import cn.lysj.framework.common.domain.User;
import cn.lysj.framework.common.repository.UserRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * @author zk
 * @description 用户表服务层
 * @create 2018-07-25 15:02:19
 **/
@Slf4j
@Service
@Transactional
public class UserService implements BaseService<User> {

    @Resource
    private UserRepository userRepository;

    @Override
    public UserRepository getRepository() {
        return userRepository;
    }

    public User findByUsername(String username) {
        return userRepository.findByUsername(username);
    }


}